(1) Field of the Invention
The present invention relates to a coding technique for a moving picture. The present invention relates, in particular, to a technique for reducing the amount of operations required for coding the moving picture by a technique that efficiently selects one intra-frame prediction mode out of plural kinds of intra-frame prediction modes in coding the moving picture by the H.264 standard.
(2) Description of the Related Art
In recent years, digitalization of AV information has made great progress, and devices which are capable of handling a digitalized video signal have become popular. Incidentally, the video signal contains a large volume of information, and it is therefore more desirable to code the video signal by reducing the amount of information considering storage volume and transmission efficiency. The international standard H.264 is standardized as an image signal coding technique. In the H.264 standard, an intra-frame prediction to execute prediction in a frame has been introduced.
According to the intra-frame prediction of a 4×4 block in the intra-frame prediction modes of the H.264 standard, a macro block of 16×16 is divided into four segments in both the vertical direction and the horizontal direction respectively so as to make 16 blocks of 4×4 blocks, and then the coding is executed for each divided block. FIG. 1 is a drawing showing the coding sequence for each 4×4 block in a macro block. As shown by numbers in the respective 4×4 blocks in FIG. 1, according to a 4×4 block intra-frame prediction, in a macro block, an 8×8 block on the upper left hand-side is coded firstly, an 8×8 block on the upper right-hand side is coded secondly, an 8×8 block on the lower left hand-side is coded thirdly, and finally an 8×8 block on the lower right-hand side is coded. FIG. 2A is a drawing showing nine intra-frame prediction modes used for the intra coding, while FIG. 2B is a drawing showing respective calculation methods of prediction errors corresponding to the nine intra-frame prediction modes shown in FIG. 2A. There exist 9 kinds of intra-frame prediction modes which are selectable for each 4×4 block, and these modes correspond to the respective different prediction directions as shown in FIG. 2A. Coding is executed by selecting one prediction mode out of the nine prediction modes. It should be noted that by the mode 2, a mean value of luminance of pixels in a coded block (that are the pixels A to D and the pixels I to L) adjacent to the current block for prediction is subtracted from the luminance of each pixel in the current block for prediction, thereby the prediction error of the 4×4 block is calculated. For example by the prediction mode 0 denoted as “0 (vertical)” shown on the upper left-hand side in FIG. 2B, the luminance of the coded pixels A to D in a block adjacent to the upper side of the current 4×4 block for prediction is subtracted respectively from the luminance of pixels on the lower side in vertical direction, the absolute value of the differences are calculated, and then the sum of absolute differences of the luminance of pixels is calculated. More specifically, the luminance of the pixel A is subtracted respectively from the luminance of four pixels on the lower side of the pixel A, and also the luminance of the pixel B is subtracted respectively from the luminance of four pixels on the lower side of the pixel B. In the same way, the luminance of the pixel C and the pixel D are subtracted respectively from the luminance of four pixels on the lower side of the pixel C and the pixel D. Accordingly the sum of absolute differences of the luminance obtained as the result of the subtractions is the prediction error of the prediction mode 0 of the current 4×4 block for prediction. As mentioned above, since the intra-frame prediction is executed by a small block of 4×4, the coding of each block can therefore be executed effectively. However it is necessary to calculate the prediction errors for the respective nine kinds of intra-frame modes and then compare the calculated prediction errors in order to select an optimum intra-frame prediction mode, and therefore a large volume of operations is needed. As a result, the improvement in the speed in coding processing has not been easy. FIG. 3 is a drawing showing a coding sequence of a block by a conventional technique so as to realize the improvement in the processing speed by means of pipeline processing of the intra-frame prediction of 4×4 block. As shown in FIG. 3, there is a suggested method in which the processing sequence by block is changed, and then the pipeline processing is executed, so that the speed of coding processing can be improved (refer to Patent Reference 1).
[Patent Reference 1]
Japanese Laid-Open Patent No. 2004-140473.
In the conventional technique disclosed in the patent reference 1, an efficient operation of a CPU and pipelining are executed so as to improve the processing speed. However the amount of operations is not substantially reduced by this conventional technique, and there exists a problem that the processing speed can not be improved in a device and software in which pipelining is not able to be executed.